package com.yans.views.display
{
	import flash.display.BitmapData;
	import flash.display.MovieClip;
	import flash.geom.Point;
	import flash.geom.Rectangle; 

	public class SwfLoaderFrame
	{
		public var bitmapData:BitmapData;
		public var maxHeight:int;
		public var maxWidth:int;
		public var offset:Point;
		public var mc:MovieClip;
		public var index:int;
		public var frames:Array;
		
		public var key:String;
		public var call:Function;
		
		public var tmpBDArr:Array;
		public var offsetArr:Array;
		
		public var loaderKey:SwfLoaderKey;
		
		public function SwfLoaderFrame()
		{
			tmpBDArr = [];
			offsetArr = [];
		}
		
		public function toFrame():BitmapFrameData {
			var frame:BitmapFrameData = new BitmapFrameData;
			frame.init([
				bitmapData,
				offsetArr,
				new Rectangle(offset.x, offset.y, maxWidth, maxHeight)
			]);
			frame.frames = frames;
			return frame;
		}
	}
}